1. Field of the Invention
The present invention relates to a network device in a data network and more particularly to metering and shaping traffic through a network device.
2. Description of the Related Art
A packet switched network may include one or more network devices, such as a Ethernet switching chip, each of which includes several modules that are used to process information that is transmitted through the device. Specifically, the device includes an ingress module, a Memory Management Unit (MMU) and an egress module. The ingress module includes switching functionality for determining to which destination port a packet should be directed. The MMU is used for storing packet information and performing resource checks. The egress module is used for performing packet modification and for transmitting the packet to at least one appropriate destination port. One of the ports on the device may be a CPU port that enables the device to send and receive information to and from external switching/routing control entities or CPUs.
Network devices often have to monitor the flow of traffic through the network device to determine whether there are points of congestion. The traffic through the device may have specific priorities, such as class-of-service (CoS) or Quality-of-Service (QoS), and the monitoring of traffic may be useful in making sure that those priorities are preserved. In addition to monitoring, the traffic through the network device can also be shaped to meet specific requirements. The shaping allows for the network device to accommodate minimum, maximum and bursty requirements.
However, as the clock speed of a network device increases, the metering and shaping of traffic must also increase to meet the increased speed requirements. As such, the methods of the prior art network devices to perform metering and shaping may not allow for proper functioning at high data rates. Thus, there is a need for metering and shaping methods that are applicable to network devices that handle multiple types of traffic.